'''
Created on Aug 11, 2009

@author: mkiyer
'''

import sys
import h5py
import numpy as np
from veggie.genome.chrom import get_chrom_length

if __name__ == '__main__':
    name = sys.argv[1]
    chrlen = get_chrom_length('chr1')
    tests = np.random.random_integers(0, chrlen, 10000)

    h5file = h5py.File(name, 'r')
    dset = h5file['chr1']
    for i in tests:
        a = dset[i:i+1000]